package top.wilbert.collegelink.forum.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import top.wilbert.collegelink.common.utils.PageUtils;
import top.wilbert.collegelink.forum.entity.TalkEntity;
import top.wilbert.collegelink.forum.vo.TalkResponseVo;

import java.util.Map;

/**
 * @author Augus
 * @email 2531496343@qq.com
 * @date 2023-02-28 14:34:36
 */
public interface TalkService extends IService<TalkEntity> {

    PageUtils queryPage(Map<String, Object> params);

    PageUtils selectSchoolTalkList(IPage<TalkResponseVo> page, Integer schoolId, Long userId);

    void reduceCommentCount(Long commentId);

    void addLikeCount(Long talkId);

    void reduceLikeCount(Long talkId);

    void addViewCount(Long talkId);

    void open(Long talkId);

    void close(Long talkId);

    void close(Long talkId, Integer status);

    PageUtils selectMyDraftTalkList(IPage<TalkResponseVo> page, Long userId);

    PageUtils selectMyTalkList(IPage<TalkResponseVo> page, Long userId);

    Long selectUserIdByTalkId(Long talkId);
}

